package com.ruoyi.system.service;

import java.util.List;

import com.ruoyi.system.domain.Forest.IotDeviceInfo;
import com.ruoyi.system.domain.Forest.second.DeviceDataResult;
import com.ruoyi.system.domain.SysAlarm;
import com.ruoyi.system.domain.SysDevice;

/**
 * 告警Service接口
 * 
 * @author ruoyi
 * @date 2024-08-13
 */
public interface ISysAlarmService 
{
    /**
     * 查询告警
     * 
     * @param alarmId 告警主键
     * @return 告警
     */
    public SysAlarm selectSysAlarmByAlarmId(Long alarmId);

    /**
     * 查询告警列表
     * 
     * @param sysAlarm 告警
     * @return 告警集合
     */
    public List<SysAlarm> selectSysAlarmList(SysAlarm sysAlarm);

    /**
     * 新增告警
     * 
     * @param sysAlarm 告警
     * @return 结果
     */
    public int insertSysAlarm(SysAlarm sysAlarm);


    /**
     * 触发Iot设备报警
     * @return
     */
    public int insertDeviceIotAlarm(IotDeviceInfo iotDeviceInfo, SysDevice device);


    /**
     * 触发Iot设备报警
     * @return
     */
    public int insertSecondDeviceIotAlarm(DeviceDataResult iotDeviceInfo, SysDevice device);
    /**
     * 设备报警
     * @return
     */
    public int insertDeviceAlarm(SysDevice device);

    /**
     * 关闭阀门，触发热量增加报警
     * @param device
     * @return
     */
    public int insertCloseAlarm(SysDevice device);
    /**
     * 修改告警
     * 
     * @param sysAlarm 告警
     * @return 结果
     */
    public int updateSysAlarm(SysAlarm sysAlarm);

    /**
     * 批量删除告警
     * 
     * @param alarmIds 需要删除的告警主键集合
     * @return 结果
     */
    public int deleteSysAlarmByAlarmIds(Long[] alarmIds);

    /**
     * 删除告警信息
     * 
     * @param alarmId 告警主键
     * @return 结果
     */
    public int deleteSysAlarmByAlarmId(Long alarmId);
}
